home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 5579 / 5579.xpi / chrome / content / default.xslt < prev    next >
Extensible Markup Language  |  2010-01-06  |  6KB  |  168 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:transform version="1.0"
  3.                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.                xmlns:atom="http://www.w3.org/2005/Atom"
  5.                xmlns:media="http://search.yahoo.com/mrss/"
  6.                xmlns:mediabroken="http://search.yahoo.com/mrss"
  7.                xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  8.                xmlns:html="http://www.w3.org/1999/xhtml"
  9.                xmlns:ci="http://schemas.cooliris.com/layout/2008">
  10.  
  11.   <xsl:output method="xml" encoding="utf-8" indent="yes"/>
  12.  
  13.   <xsl:include href="resource:theme-dark.xslt"/>
  14.   <xsl:include href="resource:common.xslt"/>
  15.  
  16.  
  17.   <xsl:param name="default-feed-icon-uri">resource:/site.rss.png</xsl:param>
  18.  
  19.  
  20.   <xsl:template match="/ci:feedData">
  21.     <ci:layoutSet>
  22.       <xul:window id="nav-bar">
  23.         <xul:hbox align="middle">
  24.           <xul:image>
  25.             <xsl:attribute name="id">image-<xsl:value-of select="$ci:com.cooliris.nav-bar.icon"/></xsl:attribute>
  26.             <xsl:attribute name="src">
  27.               <xsl:choose>
  28.                 <xsl:when test="$ci:com.cooliris.nav-bar.icon"><xsl:value-of select="$ci:com.cooliris.nav-bar.icon"/></xsl:when>
  29.                 <xsl:otherwise><xsl:value-of select="$default-feed-icon-uri"/></xsl:otherwise>
  30.               </xsl:choose>
  31.             </xsl:attribute>
  32.             <xsl:attribute name="style">
  33.               max-height: <xsl:value-of select="number($ci:sys.upper-toolbar-height) - 10"/>;
  34.               -ci-image-resize: scale-down;
  35.               -ci-content-transition: crossfade;
  36.             </xsl:attribute>
  37.           </xul:image>
  38.  
  39.           <xul:box width="{$large-separator}"/>
  40.  
  41.           <xul:description id="text" flex="1">
  42.             <xsl:attribute name="style">
  43.               <xsl:value-of select="$standard-font"/>
  44.               font-size: 12pt;
  45.               color: #ccc;
  46.             </xsl:attribute>
  47.             <xsl:value-of select="$ci:com.cooliris.nav-bar.text"/>
  48.           </xul:description>
  49.         </xul:hbox>
  50.       </xul:window>
  51.  
  52.       <xul:window id="foreground">
  53.         <xul:box/>
  54.       </xul:window>
  55.  
  56.       <xul:window id="background">
  57.         <xsl:choose>
  58.           <xsl:when test="$ci:com.cooliris.gfx.background">
  59.             <xul:box id="top" align="middle" pack="middle">
  60.               <ci:embedGroup id="background" flex="1" style="-ci-image-resize: stretch-both;">
  61.                 <ci:embed src="{$ci:com.cooliris.gfx.background}"/>
  62.                 <ci:embed src="resource:images/transparent-pixel.png"/>
  63.               </ci:embedGroup>
  64.             </xul:box>
  65.           </xsl:when>
  66.  
  67.           <xsl:otherwise>
  68.             <xul:box id="top">
  69.               <xsl:attribute name="style">
  70.                 -ci-background-gradient-color-1: #445;
  71.                 -ci-background-gradient-color-2: #000;
  72.                 -ci-background-gradient-angle: 10;
  73.               </xsl:attribute>
  74.             </xul:box>
  75.           </xsl:otherwise>
  76.         </xsl:choose>
  77.       </xul:window>
  78.     </ci:layoutSet>
  79.   </xsl:template>
  80.  
  81.  
  82.   <xsl:template match="*[local-name()='item' or local-name()='entry'][@ci:state='placeholder']">
  83.     <xsl:call-template name="standard-loading-window"/>
  84.   </xsl:template>
  85.  
  86.  
  87.   <xsl:template match="*[local-name()='item' or local-name()='entry'][@ci:state='thumbnail' or @ci:state='thumbnail-hover']">
  88.     <xsl:variable name="title">
  89.       <xsl:call-template name="get-title"/>
  90.     </xsl:variable>
  91.  
  92.     <xsl:call-template name="thumbnail-window-with-bottom-panel">
  93.       <xsl:with-param name="body">
  94.         <xsl:if test="$title != ''">
  95.           <xul:vbox id="bottom-panel" flex="1">
  96.             <xsl:attribute name="style">
  97.               padding: <xsl:value-of select="$small-separator"/>;
  98.               pack: -ci-no-padding;
  99.               -ci-background-gradient-color-1: <xsl:value-of select="$saturated-background-color"/>;
  100.               -ci-background-gradient-color-2: <xsl:value-of select="$background-color"/>;
  101.             </xsl:attribute>
  102.  
  103.             <xul:description id="title" flex="1">
  104.               <xsl:attribute name="style">
  105.                 color: <xsl:value-of select="$highlight-foreground-color"/>;
  106.                 line-height: 100%;
  107.                 -ci-text-truncate-mode: ellipsis;
  108.                 -ci-text-box-expand: true;
  109.               </xsl:attribute>
  110.               <xsl:copy-of select="$title"/>
  111.             </xul:description>
  112.           </xul:vbox>
  113.         </xsl:if>
  114.       </xsl:with-param>
  115.     </xsl:call-template>
  116.   </xsl:template>
  117.  
  118.  
  119.   <xsl:template match="*[local-name()='item' or local-name()='entry'][@ci:state='selected']">
  120.     <xsl:variable name="content-type">
  121.       <xsl:call-template name="content-type"/>
  122.     </xsl:variable>
  123.  
  124.     <xsl:call-template name="selected-window-vertical">
  125.       <xsl:with-param name="enable-interactive-mode">
  126.         <xsl:if test="$content-type != 'OTHER'">true</xsl:if>
  127.       </xsl:with-param>
  128.  
  129.       <xsl:with-param name="video-playback-control">
  130.         <xsl:choose>
  131.           <xsl:when test="$content-type = 'VIDEO'">true</xsl:when>
  132.           <xsl:otherwise>false</xsl:otherwise>
  133.         </xsl:choose>
  134.       </xsl:with-param>
  135.  
  136.       <xsl:with-param name="body">
  137.         <xsl:call-template name="standard-metadata-panel"/>
  138.       </xsl:with-param>
  139.     </xsl:call-template>
  140.   </xsl:template>
  141.  
  142.  
  143.   <xsl:template match="*[local-name()='item' or local-name()='entry'][@ci:state='full-screen']">
  144.     <xsl:variable name="content-type">
  145.       <xsl:call-template name="content-type"/>
  146.     </xsl:variable>
  147.  
  148.     <xsl:call-template name="full-screen-window">
  149.       <xsl:with-param name="enable-interactive-mode">
  150.         <xsl:if test="$content-type != 'OTHER'">true</xsl:if>
  151.       </xsl:with-param>
  152.  
  153.       <xsl:with-param name="video-playback-control">
  154.         <xsl:if test="$content-type = 'VIDEO'">true</xsl:if>
  155.       </xsl:with-param>
  156.  
  157.       <xsl:with-param name="exclude-toolbar-areas">
  158.         <xsl:if test="$content-type = 'FLASH'">true</xsl:if>
  159.       </xsl:with-param>
  160.  
  161.       <xsl:with-param name="body">
  162.         <xsl:call-template name="standard-metadata-panel"/>
  163.       </xsl:with-param>
  164.     </xsl:call-template>
  165.   </xsl:template>
  166.  
  167. </xsl:transform>
  168.